package com.tjbank.cssys.mybatis;

import com.tjbank.cssys.mybatis.entity.IamRole;
import com.tjbank.cssys.mybatis.entity.IamRoleKey;
import com.tjbank.cssys.mybatis.sqlbuilder.IamRoleSqlBuilder;
import java.util.List;

/**
 * IamRoleDao
 * 乐观锁模式
 * 
 * @author PG(Auto Generator)
 * @version V2.0
 */
public interface IamRoleDao {

    /**
     * 根据SqlBuilder查询列表，返回值包含大字段栏位
     * 
     * @param iamRoleSqlBuilder
     * @return
     * @throws Exception
     */
    public List<IamRole> selectListBySqlBuilderWithBLOBs(IamRoleSqlBuilder iamRoleSqlBuilder) throws RuntimeException;

    /**
     * 根据SqlBuilder查询列表，返回值不包含大字段栏位
     * 
     * @param iamRoleSqlBuilder
     * @return
     * @throws Exception
     */
    public List<IamRole> selectListBySqlBuilder(IamRoleSqlBuilder iamRoleSqlBuilder) throws RuntimeException;

    /**
     * 根据SqlBuilder查询单个对象，返回值包含大字段栏位
     * 
     * @param iamRoleSqlBuilder
     * @return
     * @throws Exception
     */
    public IamRole selectBySqlBuilderWithBLOBs(IamRoleSqlBuilder iamRoleSqlBuilder) throws RuntimeException;

    /**
     * 根据SqlBuilder查询单个对象，返回值不包含大字段栏位
     * 
     * @param iamRoleSqlBuilder
     * @return
     * @throws Exception
     */
    public IamRole selectBySqlBuilder(IamRoleSqlBuilder iamRoleSqlBuilder) throws RuntimeException;

    /**
     * 根据主键查询单个对象
     * 
     * @param iamRoleKey
     * @return
     * @throws Exception
     */
    public IamRole selectByPrimaryKey(IamRoleKey iamRoleKey) throws RuntimeException;

    /**
     * 根据SqlBuilder统计记录条数
     * 
     * @param iamRoleSqlBuilder
     * @return
     * @throws Exception
     */
    public long countBySqlBuilder(IamRoleSqlBuilder iamRoleSqlBuilder) throws RuntimeException;

    /**
     * 单条插入新增记录
     * 
     * @param iamRole
     * @return
     * @throws Exception
     */
    public int insert(IamRole iamRole) throws RuntimeException;

    /**
     * 批量插入新增记录
     * 
     * @param listIamRoles
     * @return
     * @throws Exception
     */
    public int insertUseBatch(List<IamRole> listIamRoles) throws RuntimeException;

    /**
     * 根据SqlBuilder更新记录，空值会持久化到数据库
     * 注意：乐观锁模式下“影响记录条数”判断处理
     * 
     * @param iamRole
     * @param iamRoleSqlBuilder
     * @return
     * @throws Exception
     */
    public int updateBySqlBuilder(IamRole iamRole, IamRoleSqlBuilder iamRoleSqlBuilder) throws RuntimeException;

    /**
     * 根据SqlBuilder更新记录，空值不会持久化到数据库
     * 注意：乐观锁模式下“影响记录条数”判断处理
     * 
     * @param iamRole
     * @param iamRoleSqlBuilder
     * @return
     * @throws Exception
     */
    public int updateBySqlBuilderSelective(IamRole iamRole, IamRoleSqlBuilder iamRoleSqlBuilder) throws RuntimeException;

    /**
     * 根据主键更新记录，空值会持久化到数据库
     * 注意：乐观锁模式下“影响记录条数”判断处理
     * 
     * @param iamRole
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKey(IamRole iamRole) throws RuntimeException;

    /**
     * 根据主键更新记录，空值不会持久化到数据库
     * 注意：乐观锁模式下“影响记录条数”判断处理
     * 
     * @param iamRole
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKeySelective(IamRole iamRole) throws RuntimeException;

    /**
     * 根据SqlBuilder删除记录
     * 
     * @param iamRoleSqlBuilder
     * @return
     * @throws Exception
     */
    public int deleteBySqlBuilder(IamRoleSqlBuilder iamRoleSqlBuilder) throws RuntimeException;

    /**
     * 根据主键删除记录
     * 
     * @param iamRoleKey
     * @return
     * @throws Exception
     */
    public int deleteByPrimaryKey(IamRoleKey iamRoleKey) throws RuntimeException;

}